package common;

import java.io.Serializable;
import java.util.Date;

/**
 * Created with IntelliJ IDEA.
 * User: Igor Demidov
 * Date: 16.02.13
 * Time: 17:53
 */
public class Email implements Serializable {
    private String from;
    private String to;
    private Date creationDate;
    private String topic;
    private String body;

    public Email(String from, String to, Date creationDate, String topic, String body) {
        this.from = from;
        this.to = to;
        this.creationDate = creationDate;
        this.topic = topic;
        this.body = body;
    }

    public String getFrom() {
        return from;
    }

    public String getTo() {
        return to;
    }

    public Date getCreationDate() {
        return creationDate;
    }

    public String getTopic() {
        return topic;
    }

    public String getBody() {
        return body;
    }

    @Override
    public String toString() {
        return "From: " + this.from + ". To: " + this.to + ". Topic: " + this.topic;
    }
}
